package org.javaymw.springboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * 描述：
 * <p>
 * Author: 赵新国
 * Date: 2017/10/24 18:26
 */
// Spring Boot 应用的标识
@SpringBootApplication
@ComponentScan(basePackages = {"org.javaymw.springboot","org.activiti"})
@MapperScan("org.javaymw.springboot.mapper")// mapper 接口类扫描包配置
//@EnableTransactionManagement
@EnableSwagger2
@EnableCaching
@EnableAsync // 开启异步调用支持
//@EnableRedisHttpSession // 开启Spring Session支持
//@EnableAutoConfiguration(exclude = {SecurityAutoConfiguration.class}) // 解决弹出登录框的问题
public class Application {

    public static void main(String[] args) {
        // 程序启动入口
        // 启动嵌入式的 Tomcat 并初始化 Spring 环境及其各 Spring 组件
        SpringApplication.run(Application.class,args);
    }
}
